<?php
/* @var $this ProjectController */
/* @var $project Project */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'project-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array(
        	'enctype' => 'multipart/form-data',
	),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($project); ?>

	<div class="row">
		<?php echo $form->labelEx($project,'name'); ?>
		<?php echo $form->textField($project,'name',array('size'=>70)); ?>
		<?php echo $form->error($project,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($project,'subtitle'); ?>
		<?php echo $form->textArea($project,'subtitle',array('rows'=>6, 'cols'=>150)); ?>
		<?php echo $form->error($project,'subtitle'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($project,'description'); ?>
		<?php echo $form->textArea($project,'description',array('rows'=>6, 'cols'=>150)); ?>
		<?php echo $form->error($project,'description'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($project,'brief'); ?>
		<?php echo $form->textArea($project,'brief',array('rows'=>6, 'cols'=>100)); ?>
		<?php echo $form->error($project,'brief'); ?>
	</div>

	<!--div class="row">
		<?php //echo $form->labelEx($project,'location'); ?>
		<?php echo $form->hiddenField($project,'location',array('rows'=>6, 'cols'=>100)); ?>
		<?php //echo $form->error($project,'location');   ?>
	</div-->

	<div class="row">
		<?php echo $form->labelEx($project,'address_details'); ?>
		<?php echo $form->textField($project,'address_details',array('size'=>70)); ?>
		<?php echo $form->error($project,'address_details'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($project,'city'); ?>
		<?php echo $form->textField($project,'city',array('size'=>70)); ?>
		<?php echo $form->error($project,'city'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($project,'province'); ?>
		<?php echo $form->textField($project,'province',array('size'=>70)); ?>
		<?php echo $form->error($project,'province'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($project,'country'); ?>
		<?php echo $form->textField($project,'country',array('size'=>70)); ?>
		<?php echo $form->error($project,'country'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($project,'building_features'); ?>
		<?php echo $form->textArea($project,'building_features',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($project,'building_features'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($project,'features'); ?>
		<?php echo $form->textArea($project,'features',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($project,'features'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($project,'amenities'); ?>
		<?php echo $form->textArea($project,'amenities',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($project,'amenities'); ?>
	</div>

	<!--div class="row">
		<?php //echo $form->labelEx($project,'latlng'); ?>
		<?php echo $form->hiddenField($project,'latlng',array('size'=>60,'maxlength'=>100)); ?>
		<?php //echo $form->error($project,'latlng'); ?>
	</div-->
	
	<div class="row">
		<?php echo $form->labelEx($picture,'url'); ?>
		<?php
		  $this->widget('CMultiFileUpload', array(
		     'model'=>$picture,
		     'name'=>'url',
		     'attribute'=>'url',
		     'accept'=>'jpg|gif|png',
		  ));
		?>
		<?php //echo $form->error($picture,'url'); ?>
	</div>
	
	<div class="row">
		<?php //echo $form->labelEx($picture,'Project_id'); ?>
		<?php //echo $form->dropDownList($model,'Project_id', CHtml::listData(Project::model()->findAll(), 'id', 'name')); ?>
		<?php echo $form->hiddenField($picture,'Project_id'); ?>
		<?php //echo $form->error($picture,'Project_id'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($project->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->